<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <base href="<?= base_url() ?>"/>
        <title>乐天！ &raquo; 首页</title>
        <meta name="generator" content="Order 1.0" /> 
        <link rel="stylesheet" href="css/style.css" type="text/css" />
        <link rel="stylesheet" href="jquery-ui/css/ui-lightness/jquery-ui-1.9.0.custom.min.css" />
        <script src="jquery-ui/js/jquery-1.8.2.js" type="text/javascript" charset="utf-8"></script>
        <script src="jquery-ui/js/jquery-ui-1.9.0.custom.min.js" type="text/javascript" charset="utf-8"></script>
        <script>
            $(function() {   
                $("#login").on('click',function(e){
                    var data = $("#loginForm").serialize();
                    var url=$("#loginForm")[0].action;
                    $.post(url, data,function (result) {
                        //alert(result);
                        if(result =='password_error'){
                            $('#error').html('&nbsp密码错误');
                            return false;
                        }
                        else if(result =='user_invalid'){
                            $('#error').html('&nbsp用户名不存在');
                            return false;
                        }
                        else {
                            window.location.reload();
                            return false;
                        }
                    });
                    return false;
                });
            });    
        </script>
        <style>
            .search_bnt {
                height: 32px;
                font-weight:bold;
                font-size:13px;
                width: 100%;
                background: #7FA448;
                margin: 0;
                border: none;
                cursor: pointer;
                color: white;
            }
            .search_bnt:hover{
                background: #8cb352;
            }
            #main{
                margin:10px auto;
                width: 840px;
                height: 350px;
                background: url(images/bg.jpg) no-repeat;
            }
            #left_side{
                float: left;
            }
            #right_side{
                float: right;
                width: 238px;
                background: #EBF2FA;
                border: 1px solid #D4D4D4;
                border-bottom-color: #AAA;
                border-top: none;
                height: 350px;
                box-shadow: 0 1px 1px #CCC;
                margin-top: -2px;
                position: relative;
            }

            #login_div{
                color: #333;
                padding:35px 15px 15px 25px;
                width: 190px;
                position: relative;
            }
            #login_div .top, #login_div .pwd{
                background-size: auto;
                color: #333;
                display: block;
                font-size: 12px;
                height: 36px;
                line-height: 20px;
                position: relative;
                width: 190px;
            }
            #login_div dl{
                margin: 15px 0 0 0 ;
            }
            #login_div dd{
                color: #333;
                display: block;
                font-size: 12px;
                height: 32px;
                line-height: 32px;
                padding: 1px;
                position: relative;
                width: 186px;
                padding-left: 30px;
            }
            #login_div .top dt, .pwd dt{
                background-attachment: scroll;
                background: url(images/ico.png) 8px -84px no-repeat;
                display: block;
                height: 25px;
                left: 4px;
                line-height: 20px;
                position: absolute;
                text-indent: -119988px;
                top: 4px;
                width: 25px;
                z-index: 2;
            }
            #login_div .pwd dt{
                background: url(images/ico.png) 8px -112px no-repeat;
            }
            #login_div input[type="text"],input[type="password"]{
                background-attachment: scroll;
                display: inline-block;
                font-size: 14px;
                height: 32px;
                line-height: 32px;
                margin: 0 0 0 30px;
                text-align: start;
                text-indent: 0px;
                text-shadow: none;
                padding: 0;
                border: 0;
                width: 155px;
            }
            #login_div .bottom{
                margin-top: 30px;
            }
            #login_div .header{
                background: url(images/logo1.jpg)  no-repeat;
                height: 65px;
            }
            #login_div .end{
                width: 187px;
                background: url(images/logo.jpg)  no-repeat;
                height: 55px;
                margin-top: 10px;
            }
            #login_div #login{
                background-color: transparent;
                background: url(images/btn.png) 0 -38px;
                background-origin: padding-box;
                background-size: auto;
                cursor: pointer;
                display: inline-block;
                font-size: 12px;
                height: 38px;
                text-align: center;
                text-indent: -119988px;
                width: 190px;
                border:0;
                padding:0 0 3px 0;
                word-spacing: 0px;
            }
        </style>
    </head>
    <body>
        <div id="container">
            <div id="header">
                <div id="header-inner">
                    <h1><span><a href="#">乐天！</a></span></h1>
                    <h2>订单管理系统</h2>
                    <div class="clear"></div>
                    <ul class="sw_menu">
                        <li ><a href=<?php echo site_url('login')?> class="sw_menu_current">首页</a></li>
                        <li><a href=<?php echo site_url('order')?> >管理</a></li>
                        <li><a href=# >筛选</a></li>
                        <?php
                        if ($is_admin)
                            echo '<li><a href=' . site_url('admin') . '>后台</a></li>';
                        ?>
                    </ul>
                    <div style="position:absolute;top:87px;right:0px;">
                    </div>
                    </div>
                </div>
                <div id="main">
                    <div id="left_side">
                    </div>
                    <div id="right_side">
                        <div id="login_div">
                            <form method="post" id="loginForm" class="login-form" action=<?php echo site_url("login/logout"); ?>>
                                <p style="font-size:14px;font-weight: bold">帐号:<?php echo "$uname"; ?></p>
                                <div style="height: 120px;border-color: #ADB6C9;  border-radius: 3px;    border-style: solid; border-width: 1px;
                                  box-shadow: white 0px 0px 1px 0px;">
                                    <ul>
                                        <?php if($p_list['p1']) echo "<li>新建订单处理</li>"; ?>
                                         <?php if($p_list['p2']) echo "<li>待付款订单处理</li>"; ?>
                                         <?php if($p_list['p3']) echo "<li>待采购订单处理</li>"; ?>
                                        <?php if($p_list['p4']) echo "<li>待发货订单处理</li>"; ?>
                                        <?php if($p_list['p5']) echo "<li>已发货订单处理</li>"; ?>
                                        <?php if($p_list['p6']) echo "<li>后台管理</li>"; ?>
                                    </ul>
                                 </div>
                             <dl class="bottom">
                                <input type="submit" name="sub" tabindex='3' id="login" value="登录" />
                            </dl>
                            </form>
                        <div class="end">
                         </div>
                    </div>
                </div>
            </div>
            <div class="clear"> </div>
            <div id="footer">
                <hr />
                <ul>
                    <li>
                        Powered by <a href=#>zju</a>
                    </li>
                </ul>
            </div>
        </div>
    </body>
</html>